﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TsSite.Master" AutoEventWireup="true" CodeBehind="TireSetLogList.aspx.cs" Inherits="TireService.Web.Casehandling.TireSetLogList" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.12.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script src="../Scripts/ModalPopup.js" type="text/javascript"></script>
    
    <dx:ASPxRoundPanel ID="rpContent" runat="server" Width="100%" ShowHeader="true" Height="100%">
        <PanelCollection>
            <dx:PanelContent ID="PanelContent1" runat="server">
                
                <asp:UpdatePanel ID="upMessage" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <table border="0" cellspacing="0" cellpadding="5">
                            <tr>
                                <td>
                                    <div style="font-family: Tahoma; font-size: 9pt; font-weight: normal; color: #f15e34">
                                        &nbsp;<asp:Literal ID="lMessage" runat="server"></asp:Literal>
                                    </div>
                                </td>
                            </tr>
                        </table>          
                    </ContentTemplate>
                </asp:UpdatePanel>
                
                <asp:UpdatePanel ID="upTireSetLogAction" runat="server">
                    <ContentTemplate>
                        <table border="0" cellspacing="0" cellpadding="5" width="100%">
                            <tr>
                                <td>
                                    <asp:DropDownList ID="ddlAction" runat="server">
                                        <asp:ListItem Selected="True" Value="0">-- Handling --</asp:ListItem>
                                        <%--<asp:ListItem Value="1">Rediger valgte</asp:ListItem>--%>
                                    </asp:DropDownList>
                                    &nbsp;
                                    <asp:Button ID="btnSubmitAction" runat="server" Text="Udfør" 
                                        onclick="btnSubmitAction_Click" />
                                    &nbsp;
                                    <asp:DropDownList ID="ddlExport" runat="server">
                                        <asp:ListItem Selected="True" Value="0">Export pdf</asp:ListItem>
                                        <asp:ListItem Value="1">Export xls</asp:ListItem>
                                        <asp:ListItem Value="2">Export csv</asp:ListItem>
                                        <asp:ListItem Value="3">Export rtf</asp:ListItem>
                                    </asp:DropDownList>
                                    &nbsp;
                                    <asp:Button ID="btnExport" runat="server" CausesValidation="False" 
                                        Text="Exporter" onclick="btnExport_Click" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblPageSize" runat="server" Text="Antal linjer pr side"></asp:Label>
                                    <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="true">
                                        <asp:ListItem Value="10">10</asp:ListItem>
                                        <asp:ListItem Value="25">25</asp:ListItem>
                                        <asp:ListItem Value="50">50</asp:ListItem>
                                        <asp:ListItem Value="100">100</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>          
                    </ContentTemplate>    
                </asp:UpdatePanel>
                
                <asp:UpdatePanel ID="upTireSetLog" runat="server">
                    <ContentTemplate>
                        <h3>Data om hjulsæt</h3>
                        <table width="100%">
                            <tr>
                                <td style="width:150px">Dæktype</td>
                                <td style="width:150px">
                                    <asp:Label ID="lblTireType" runat="server" Text=""></asp:Label>
                                </td>
                                <td rowspan="15">
                                    <asp:Panel ID="pTireSetChange" runat="server" Visible="false">
                                        Skift dæk<br />

                                        <dxe:ASPxComboBox ID="ddlFromTireSet" runat="server">
                                        </dxe:ASPxComboBox>
                                    
                                        <dxe:ASPxComboBox ID="ddlToTireSet" runat="server">
                                        </dxe:ASPxComboBox>

                                        <asp:Button ID="btnCancelTireSetChange" runat="server" Text="Annuller" />
                                    </asp:Panel>

                                    <asp:Panel ID="pContainerMove" runat="server" Visible="false">
                                        Flyt dæk<br />
                                    
                                        <asp:Button ID="btnCancelContainerMove" runat="server" Text="Annuller" />
                                    
                                    </asp:Panel>

                                    <asp:Panel ID="pDeactivateTireSet" runat="server" Visible="false">
                                        Deaktiver dæksæt<br />
                                        <asp:Button ID="btnCancelDeactivateTireSet" runat="server" Text="Annuller" />
                                    
                                    
                                    </asp:Panel>

                                </td>
                            </tr>
                            <tr>
                                <td>Dimensioner</td>
                                <td>
                                    <asp:Label ID="lblDimensions" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Hastighedsindex</td>
                                <td>
                                    <asp:Label ID="lblTireSpeedIndex" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Mærke</td>
                                <td>
                                    <asp:Label ID="lblTireBrand" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Model variant</td>
                                <td>
                                    <asp:Label ID="lblTireBrandNote" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Hastighedsindex</td>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Load Index</td>
                                <td>
                                    <asp:Label ID="lblTireLoadIndex" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Status</td>
                                <td>
                                    <asp:Label ID="lblTireSetStatus" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Lager</td>
                                <td>
                                    <asp:LinkButton ID="lbtnContainerCargoRoomId" runat="server"></asp:LinkButton>
                                </td>
                            </tr>
                            <tr>
                                <td>Låsebolt</td>
                                <td>
                                    <asp:CheckBox ID="cbLockingBolt" runat="server" Enabled="false" />
                                </td>
                            </tr>
                            <tr>
                                <td>Hjulkapsler</td>
                                <td>
                                    <asp:CheckBox ID="cbHubCaps" runat="server" Enabled="false" />
                                </td>
                            </tr>
                            <tr>
                                <td>Run flat dæk</td>
                                <td>
                                    <asp:CheckBox ID="cbRunFlatTire" runat="server" Enabled="false" />
                                </td>
                            </tr>
                            <tr>
                                <td>Kant beskytter</td>
                                <td>
                                    <asp:CheckBox ID="cbRimProtection" runat="server" Enabled="false" />
                                </td>
                            </tr>
                            <tr>
                                <td>Produktionsdato</td>
                                <td>
                                    <asp:Label ID="lblManufactureDate" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>Topnøgle størrelse</td>
                                <td>
                                    <asp:Label ID="lblSocketWrenchSize" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                        </table>

                        <dxwgv:ASPxGridView ID="gvTireSetLog" runat="server" ClientInstanceName="gvTireSetLog" 
                            KeyFieldName="TireSetLogId" Width="100%" AutoGenerateColumns="False" EnableCallBacks="False" 
                            oncustomunboundcolumndata="gvTireSetLog_CustomUnboundColumnData" 
                            oncustombuttoncallback="gvTireSetLog_CustomButtonCallback">
                            <SettingsLoadingPanel Text="Henter&amp;hellip;" />
                            <Settings ShowHeaderFilterButton="true" ShowGroupPanel="true" ShowFilterRow="True" />
                            <SettingsPager AlwaysShowPager="True" PageSize="20" Position="TopAndBottom">
                                <Summary 
                                    AllPagesText="Sider: {0} - {1} ({2} log poster)" 
                                    Text="Side {0} af {1} ({2} log poster)" />
                            </SettingsPager>
                            <SettingsText ConfirmDelete="Vil du slette denne log post?" GroupPanel="Træk kolonne hertil for at gruppere efter den" HeaderFilterShowAll="Vis alle" />
                            <SettingsBehavior ConfirmDelete="True" AllowGroup="true" AllowDragDrop="true" />
                            
                            <Columns>
                                <dxwgv:GridViewCommandColumn VisibleIndex="1">
                                    <CustomButtons>
                                        <dxwgv:GridViewCommandColumnCustomButton Text="Rediger" ID="Edit" />
                                    </CustomButtons>
                                </dxwgv:GridViewCommandColumn>
                                <%--<dxwgv:GridViewDataHyperLinkColumn FieldName="CustomerId" VisibleIndex="2" Caption="Abonnementer">
                                    <PropertiesHyperLinkEdit NavigateUrlFormatString="~/Casehandling/EditCustomer.aspx?CustomerId={0}&Area=Subscription" Text="Vis">
                                    </PropertiesHyperLinkEdit>
                                </dxwgv:GridViewDataHyperLinkColumn>--%>
                                <dxwgv:GridViewDataColumn FieldName="TireSetLogId" VisibleIndex="2" Caption="LogId">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataColumn FieldName="TireSetId" VisibleIndex="3" Visible="false" Caption="TireSetId">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataColumn FieldName="LogDate" VisibleIndex="4" Caption="Dato">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataColumn FieldName="FromTireSetStatusId" VisibleIndex="7" Caption="FromTireSetStatusId" Visible="false">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataTextColumn FieldName="FromTireSetStatusDescription" VisibleIndex="8" UnboundType="String" Caption="Fra status">
                                </dxwgv:GridViewDataTextColumn>
                                <dxwgv:GridViewDataColumn FieldName="ToTireSetStatusId" VisibleIndex="7" Caption="FromTireSetStatusId" Visible="false">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataTextColumn FieldName="ToTireSetStatusDescription" VisibleIndex="8" UnboundType="String" Caption="Til status">
                                </dxwgv:GridViewDataTextColumn>
                                <dxwgv:GridViewDataColumn FieldName="UserId" VisibleIndex="7" Caption="UserId" Visible="false">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataTextColumn FieldName="UserName" VisibleIndex="8" UnboundType="String" Caption="Bruger">
                                </dxwgv:GridViewDataTextColumn>
                                <dxwgv:GridViewDataColumn FieldName="LeftFrontTirePattern" VisibleIndex="9" Caption="V.F mønster">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataColumn FieldName="RightFrontTirePattern" VisibleIndex="9" Caption="H.F mønster">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataColumn FieldName="LeftRearTirePattern" VisibleIndex="9" Caption="V.B mønster">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataColumn FieldName="RightRearTirePattern" VisibleIndex="9" Caption="H.B mønster">
                                </dxwgv:GridViewDataColumn>
                                <dxwgv:GridViewDataHyperLinkColumn FieldName="ContainerCargoRoomId" VisibleIndex="17" Caption="Lager">
                                    <PropertiesHyperLinkEdit NavigateUrlFormatString="~/Casehandling/EditContainer.aspx?ContainerCargoRoomId={0}" TextField="ContainerCargoRoomId" >
                                    </PropertiesHyperLinkEdit>
                                </dxwgv:GridViewDataHyperLinkColumn>
                            </Columns>
                        </dxwgv:ASPxGridView>                       
                    </ContentTemplate>
                </asp:UpdatePanel>
                
                <dxwgv:ASPxGridViewExporter ID="gvExport" runat="server" GridViewID="gvTireSetLog">
                </dxwgv:ASPxGridViewExporter>
                
            </dx:PanelContent>
        </PanelCollection>
        <HeaderTemplate>
            <table cellpadding="0" cellspacing="2" border="0">
                <tr>
                    <td>
                        <img id="imgCustomer" alt="" src="~/Images/Medium/businessmen.png" runat="server" style="width: 32px; height: 32px" />
                    </td>
                    <td valign="middle">
                        <h3><asp:Label ID="lblCustomerHeader" runat="server" Text="Kunder"></asp:Label></h3>
                    </td>
                </tr>
            </table>
        </HeaderTemplate>
    </dx:ASPxRoundPanel>

</asp:Content>
